#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;


class A {
public:
    virtual void func1() { cout << "A::func1" << endl; }
    virtual void func2() { cout << "A::func2" << endl; }
private:
    int a = 1;
};
class B : virtual public A {
public:
    void func2() override{ cout << "B::func2" << endl; }
    virtual void func5() { cout << "B::func5" << endl; }
private:
    int b = 2;
};
class C : virtual public A {
public:
    virtual void func3() { cout << "C::func3" << endl; }
private:
    int c = 3;
};
class D : public B, public C {
public:
    virtual void func4() { cout << "D::func4" << endl; }
private:
    int d = 4;
};

void test() {};

int main() {
    
    test();
    D d;
    return 0;
}